<?php
/**
 * Each engineer has a duty to keep the code elegant
 * Created by wolffy.
 * Author @wolffy<13750088090@sina.cn>
 * Date: 2018/8/14
 * Time: 17:39
 */
namespace App\Http\Controllers\Api\V2_0_0;

use App\Services\PopupService;
use Illuminate\Http\Request;

class PopupController extends ApiController
{
    protected $popupService;

    public function __construct(PopupService $popupService)
    {
        $this->popupService = $popupService;
    }

    public function getPopupList(Request $request)
    {
        if (empty($request->position)) {
            return $this->responseJson(422);
        }
        return $this->popupService->getPopupList($request->position);
    }


}